<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8">
		<title></title>
	</head>
	<body>
    <div id="app">
      <input type="number" v-model="num" />
      <p>{{result}}</p>
    </div>
	</body>
  <script src="../vue.js"></script>
  <script src="https://cdnjs.cloudflare.com/ajax/libs/gsap/3.2.4/gsap.min.js"></script>
  <script type="text/javascript">
    
    new Vue({
      el:"#app",
      data:{
        num:0,
        animateNum: 0
      },
      computed:{
        result(){
          return this.animateNum.toFixed(0)
        }
      },
      watch:{
        num(v){
          gsap.to(this.$data, { duration: 0.5, animateNum: v })
        }
      }
    })
    
  </script>
</html>
